﻿<%@ Page Title="Shop by Pacayitas Aliance" Language="C#" MasterPageFile="~/PureTravelMaster.Master"
    AutoEventWireup="true" CodeBehind="Shop.aspx.cs" Inherits="CostaRicaPureTravel.Shop"
    EnableViewStateMac="false" %>

<%@ Register TagPrefix="userControl" TagName="PopUp" Src="~/UserControls/AjaxBasedPopUpControl.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 23px;
        }
        
        #tableShop label
        {
            display: initial !important;
            margin-left: 38px !important;
        }
        .smart-green table tbody
        {
            text-align: start !important;
        }
        
        #tableShop input
        {
            margin-right: 6px;
        }
    </style>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            verifyChecks();
        });

        function verifyChecks() {
            var selectedValues = $("#<%= SelectedValues.ClientID %>");
            jQuery("input[type=checkbox]").change(function (e) {
                var value = getSelectedValue();
                selectedValues.val(value);
            });
        }

        function getSelectedValue() {
            var values = "";
            var first = true;
            $("#tableShop").find("input[type=checkbox]").each(function () {
                if ($(this).is(':checked')) {
                    console.log("Jola");
                    if (first) {
                        values = $(this).attr("value");
                        first = false;
                    } else {
                        values = values + ", " + $(this).attr("value");
                    }
                }
            });
            return values;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderCarrousel" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SideBarL" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <userControl:PopUp runat="server" ID="AjaxPopUp" Message="CONTACT_EMAIL_SENT" MessageType="Success" />
    <asp:HiddenField ID="SelectedValues" runat="server"  ClientIDMode="Static"/>
    <div class="content">
        <h1>
            <asp:Literal ID="Literal5" runat="server" Text="<%$Resources:Resource, SHOP_TITLE%>" /></h1>
        <br clear="all" />
        <asp:Literal ID="Literal6" runat="server" Text="<%$Resources:Resource, SHOP_INFO%>" />
        <h1>
            <span style="width: auto!important; font-size: 26px; color: Red!important;">
                <asp:Literal ID="LitNotAvai" Visible="false" Text="<%$Resources:Resource, NOT_AVA_FOR_YOUR_COUNTRY%>"
                    runat="server" /></span>
        </h1>
        <div class="smart-green" runat="server" id="formContact">
            <h1>
                <asp:Literal ID="Literal7" runat="server" Text="<%$Resources:Resource, SHOP_HIGHLIGHTS1%>" />
                <span>
                    <asp:Literal ID="Literal8" runat="server" Text="<%$Resources:Resource, SHOP_HIGHLIGHTS2%>" /></span>
            </h1>
            <label>
                <span>
                    <asp:Literal ID="Literal26" Text="<%$Resources:Resource, CONTACT_US_FORM_NAME%>"
                        runat="server" /></span>
                <asp:TextBox runat="server" ID="txtFirstName" placeholder="<%$Resources:Resource, CONTACT_US_FORM_NAME_HOLDER%>" />
                <asp:RequiredFieldValidator CssClass="spanError" ID="RequiredFieldValidator1" Display="Dynamic"
                    ControlToValidate="txtFirstName" runat="server">
                    <asp:Image ID="Image1" ImageUrl="images/icoError.gif" runat="server" Width="16" Height="16" />
                </asp:RequiredFieldValidator>
            </label>
            <label>
                <span>
                    <asp:Literal ID="Literal36" Text="<%$Resources:Resource, CONTACT_US_FORM_LAST_NAME%>"
                        runat="server" /></span>
                <asp:TextBox runat="server" ID="txtLastName" placeholder="<%$Resources:Resource, CONTACT_US_FORM_LAST_NAME_HOLDER%>" />
                <asp:RequiredFieldValidator CssClass="spanError" ID="RequiredFieldValidator2" Display="Dynamic"
                    ControlToValidate="txtLastName" runat="server">
                    <asp:Image ID="Image2" ImageUrl="images/icoError.gif" runat="server" Width="16" Height="16" />
                </asp:RequiredFieldValidator>
            </label>
            <label>
                <span>
                    <asp:Literal ID="Literal46" Text="<%$Resources:Resource, CONTACT_US_FORM_EMAIL%>"
                        runat="server" /></span>
                <asp:TextBox runat="server" ID="txtEmailAddress" placeholder="<%$Resources:Resource, CONTACT_US_FORM_EMAIL_HOLDER%>" />
                <asp:RequiredFieldValidator CssClass="spanError" ID="RequiredFieldValidator3" Display="Dynamic"
                    ControlToValidate="txtEmailAddress" runat="server">
                    <asp:Image ID="Image3" ImageUrl="images/icoError.gif" runat="server" Width="16" Height="16" />
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator CssClass="spanError" ControlToValidate="txtEmailAddress"
                    Display="Dynamic" ID="RegularExpressionValidator1" ValidationExpression="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$"
                    runat="server" ErrorMessage="RegularExpressionValidator">
                    <asp:Image ID="Image5" ImageUrl="images/icoError.gif" ToolTip="<%$Resources:Resource, CONTACT_US_FORM_EMAIL_INVALID%>"
                        runat="server" Width="16" Height="16" />
                </asp:RegularExpressionValidator>
            </label>
            <label>
                <span>
                    <asp:Literal ID="Literal1" Text="<%$Resources:Resource, CONTACT_US_FORM_PHONE%>"
                        runat="server" /></span>
                <asp:TextBox runat="server" ID="txtPhone" placeholder="<%$Resources:Resource, CONTACT_US_FORM_PHONE_HOLDER%>" />
                <asp:RequiredFieldValidator CssClass="spanError" ID="RequiredFieldValidator4" Display="Dynamic"
                    ControlToValidate="txtPhone" runat="server">
                    <asp:Image ID="Image4" ImageUrl="images/icoError.gif" runat="server" Width="16" Height="16" />
                </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator CssClass="spanError" ControlToValidate="txtPhone"
                    Display="Dynamic" ID="RegularExpressionValidator2" ValidationExpression="^([0-9\(\)\/\+ \-]*)$"
                    runat="server">
                    <asp:Image ID="Image6" ImageUrl="images/icoError.gif" ToolTip="<%$Resources:Resource, CONTACT_US_FORM_PHONE_INVALID%>"
                        runat="server" Width="16" Height="16" />
                </asp:RegularExpressionValidator>
            </label>
            <label>
                <span>
                    <asp:Literal ID="Literal10" Text="<%$Resources:Resource, CONTACT_US_FORM_MESSAGE%>"
                        runat="server" /></span>
                <asp:TextBox runat="server" ID="txtMessage" TextMode="MultiLine" name="message" />
                <asp:RequiredFieldValidator CssClass="spanError" ID="RequiredFieldValidator5" Display="Dynamic"
                    ControlToValidate="txtMessage" runat="server">
                    <asp:Image ID="Image7" ImageUrl="images/icoError.gif" runat="server" Width="16" Height="16" />
                </asp:RequiredFieldValidator>
            </label>
            <br clear="all" />
            <div runat="server" id="formTable">
                <span>
                    <asp:Literal ID="Literal9" runat="server" Text="<%$Resources:Resource, SHOP_TABLE%>" /></span>
            </div>
            <br clear="all" />
            <label>
                <span style="width: 140px">
                    <asp:Literal ID="Literal4" Text="<%$Resources:Resource, SHOP_SEND_ME_COPY%>" runat="server" /></span>
                <asp:CheckBox runat="server" ID="checkSendMeCopy" Text="" />
            </label>
            <label>
                <span style="width: 140px">&nbsp;</span>
                <asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="<%$Resources:Resource, CONTACT_US_FORM_SUBMIT%>"
                    OnClick="btnSubmit_Click" />
            </label>
            <br clear="all" />
        </div>
        <span style="width: auto!important; font-size: 15px; color: Red!important;"></span>
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="SideBarRi" runat="server">
</asp:Content>
